Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OnFlushCompleted fired before flush result write to MANIFEST (#5908) #127

Merged
merged 1 commit into from
Oct 30, 2019
Merged

Fix OnFlushCompleted fired before flush result write to MANIFEST (#5908) #127

merged 1 commit into from
Oct 30, 2019

Conversation

yiwu-arbug
Copy link
Collaborator

Summary:
When there are concurrent flush job on the same CF, OnFlushCompleted can be called before the flush result being install to LSM. Fixing the issue by passing FlushJobInfo through MemTable, and the thread who commit the flush result can fetch the FlushJobInfo and fire OnFlushCompleted on behave of the thread actually writing the SST.

Fix facebook#5892
Pull Request resolved: facebook#5908

Test Plan: Add new test. The test will fail without the fix.

Differential Revision: D17916144

Pulled By: riversand963

fbshipit-source-id: e18df67d9533b5baee52ae3605026cdeb05cbe10

…ebook#5908)

Summary:
When there are concurrent flush job on the same CF, `OnFlushCompleted` can be called before the flush result being install to LSM. Fixing the issue by passing `FlushJobInfo` through `MemTable`, and the thread who commit the flush result can fetch the `FlushJobInfo` and fire `OnFlushCompleted` on behave of the thread actually writing the SST.

Fix facebook#5892
Pull Request resolved: facebook#5908

Test Plan: Add new test. The test will fail without the fix.

Differential Revision: D17916144

Pulled By: riversand963

fbshipit-source-id: e18df67d9533b5baee52ae3605026cdeb05cbe10
@yiwu-arbug
Copy link
Collaborator Author

Cherry-picking the fix from upstream. Will not include in tikv 3.0.5 release.

Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiwu-arbug yiwu-arbug merged commit 8a63fcb into tikv:6.4.tikv Oct 30, 2019
@yiwu-arbug yiwu-arbug deleted the flush_fix_6.4 branch October 30, 2019 06:00
Connor1996 pushed a commit that referenced this pull request Nov 19, 2019
…ebook#5908) (#127) (#130)

Summary:
When there are concurrent flush job on the same CF, `OnFlushCompleted` can be called before the flush result being install to LSM. Fixing the issue by passing `FlushJobInfo` through `MemTable`, and the thread who commit the flush result can fetch the `FlushJobInfo` and fire `OnFlushCompleted` on behave of the thread actually writing the SST.

Fix facebook#5892
Pull Request resolved: facebook#5908

Test Plan: Add new test. The test will fail without the fix.

Differential Revision: D17916144

Pulled By: riversand963

fbshipit-source-id: e18df67d9533b5baee52ae3605026cdeb05cbe10
Signed-off-by: Yi Wu <yiwu@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OnFlushCompleted is called before flush completed
2 participants